home *** CD-ROM | disk | FTP | other *** search
- /* Get internal things of BareED - NOTE:
- The region size differs from the TextBuffer size by 4 bytes.
- When you a encounter a value '4' it represents this fact!
- */
-
- BAREED_HOST = GetClip('BAREED')
-
- IF BAREED_HOST = '' THEN DO
- CALL SetClip('BAREED') /* Remove from ClipNode */
- EXIT 5
- END
-
- ADDRESS VALUE BAREED_HOST
-
- CALL SetClip('BAREED') /* Remove from ClipNode */
-
- /* ---------------------- MAIN --------------------- */
-
- 'set error off' /* BareED, return errors! Default.
- Since ERROR collides with a ARexx keyword we
- have to set ERROR within single quotes */
-
- 'set echo off' /* BareED, don't display given ARexx string and parsing results. Default.
- Since ECHO collides with a ARexx keyword we
- have to set ECHO within single quotes */
-
- options results /* Tell BareED to return things */
-
-
- get archivename /* as usually, macro commands in lower case */
- AName = result
- if AName = "" then
- AName = "<-unset->"
-
- get filename
- FName = result
- if FName = "" then
- FName = "<-unset->"
-
- get font
- FoName = result
-
- get tab size
- TSize = result
-
- LF = '0a'x
-
- string = "Informations for archive »"AName"«."LF LF
- string = string || "Archive will be saved to »"FName"«"LF
- string = string || "using font »"FoName"« and a tab size of "TSize"."LF LF
-
-
- 'get region' /* Supplied in lower case */
- StPtr = result
-
- 'GET REGION SIZE' /* Supplied in upper case */
- StSize = result
-
- 'geT AMOUNT chArs' /* Supplied in mixed form */
- Used = result
-
- /* Of course you can also enter each commandline without single quotes - when no BareED
- supported keyword collides with ARexx ones!
- */
-
-
- string = string || "Storage starts at 0x"D2X(StPtr)", size" StSize "bytes ("StSize / 1024 "Kbytes)."LF
-
- numeric digits 3 /* Output of computed values limited to 3 digits from now on */
-
- string = string || "Storage filled with" Used "characters and therewith to" ABS((Used + 4) * 100 / StSize)"%%."LF
-
- numeric digits 9 /* Reset to default */
-
- string = string || "Free bytes in storage:" StSize - Used - 4 "bytes."LF
-
- get archivestart
- AStart = result
-
- get archiveend
- AEnd = result
-
- get amount lines
- ALines = result
-
- string = string || LF || "Archive starts at memory location 0x"D2X(AStart) "and"LF
- string = string || "ends at 0x"D2X(AEnd) "where the archive contains" ALines "lines."
-
- Tell string
-